Sociology 229:  Advanced Regression

 

Assignment #5:  Multilevel Models

 

Due:  Start of class, March 1

 

This assignment requires a dataset on the course website entitled “Assignment 5 Multilevel.dta” and an accompanying do-file.

 

Regarding the data:  This is a small dataset of educational measures, taken from a larger study.  The sample includes 260 students from ten different schools.  The key outcome variable is “math”, a student’s score on a math achievement test.  Schools are identified by the variable “schoolid". 

 

  1. Download the dataset in STATA
  2. Create your own “do” file that opens the data
  3. Run a simple OLS regression model looking at the effects of student SES, gender (female vs. not), and race (white vs not) on math test performance.
  4. Run an OLS regression with robust standard errors adjusted for clustering by school.
  5. Use the xtreg command to run a “between” (aggregate), “within” (fixed effects), and random effects model.
  6. Conduct a Hausman test to compare the fixed and random intercept models.
  7. Add level-2 variable for school-mean-SES and school size.  Estimate both fixed and random effects.
  8. Use xtmixed to run a random coefficients model, allowing the effect of SES to vary across schools.

 

Questions:

 

1.  Comment on the changes in the findings, comparing the original OLS model to the fixed effects model (step 3 vs 5).  How did the results differ (or not)?

 

2.  Describe the results of the Hausman test.  Which coefficients differed a lot?  Which model is preferred?

 

3.  What happened when you included the level-2 variables in the fixed effects model?

 

4.  Describe the effects of SES and school mean SES in step 7.  Provide an interpretation.  NOTE:  The addition of school-mean-SES allows you to decompose the “within” and “between” effects in the same model.  The SES variable reflects “within” variation, while the mean SES variable reflects “between” variation.

 

5.  How does the model in step 8 differ from a simple random intercept model?  Write a few sentences describing what it means to allow “SES” to be “random”.

 

Turn in the following:

 

1. Stata output from the fixed and random effects models in step 5. 

 

2.  Output from the Hausman test. 

 

3.  Output from the random effects model in step 7.

 

4. Answers to the questions